var express = require('express');
var bodyParser = require('body-parser');

var app = express();

// parse application/x-www-form-urlencoded
//p.use(bodyParser.urlencoded({extended: false}));
// parse application/json
app.use(bodyParser.json());

app.use(function(req, res) {
  // 注册用户
  res.end('Registered new user: ' + req.body.username);
}).listen(3000);
